package com.sys.plat.db;

import java.sql.SQLException;
import java.sql.Statement;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.jdbc.core.StatementCallback;
import org.springframework.jdbc.core.support.JdbcDaoSupport;



@SuppressWarnings("unchecked")
public class JDBCDao extends JdbcDaoSupport {
	protected final Log log = LogFactory.getLog(getClass());

	/**
	 * todo
	 * 
	 * @param o
	 * @return
	 */
	public void saveObject(final String sql) {
		this.getJdbcTemplate().execute(new StatementCallback(){

			public Object doInStatement(Statement stmt){
			try{
			stmt.execute(sql);
			}catch(SQLException sqle)
			{
				sqle.printStackTrace();
			}
			return null;

			}

			});


	}

}
